export function isSameSecond(time1, time2) {
    return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);
}
function simRaf(fn) {
    return setTimeout(fn, 1000 / 60);
}
export function raf(fn) {
    // 小程序、App -- ReferenceError: requestAnimationFrame is not defined
    // const rr: Function = requestAnimationFrame || simRaf
    const rr = simRaf;
    return rr(fn);
}
export function cancelRaf(id) {
    // const rr: Function = cancelAnimationFrame || clearTimeout
    const rr = clearTimeout;
    rr(id);
}
